using System.Collections.Generic;
using AO.Core.ScriptAPI;
/// <summary>
/// This is a test script
/// To edit scripts, set their Build Action to "Compile", in order to get Highlighting and Intellisense.
/// Later, set the Build Action back to "None" when finished.
/// </summary>
public class TestScript
{
	/// <summary>
	/// This is the script entry point
	/// </summary>
	public static void ScriptMain()
	{
		MyScriptedClass cls = new MyScriptedClass();
	}
}

public class MyScriptedClass
{
	private ScriptAPI api;
	private System.Timers.Timer scriptTick;

	public MyScriptedClass()
	{
		scriptTick = new System.Timers.Timer(5000);
		scriptTick.Elapsed += new System.Timers.ElapsedEventHandler(scriptTick_Elapsed);
		scriptTick.Enabled = true;

		api = new ScriptAPI();
		api.DynelControl.Spawn(8277116, 299, 0, 172, 545);
		List<string> strings = new List<string>();
		for (int i = 0; i < 10; i++)
		{
			strings.Add(string.Format("String #{0}", i));
		}

		foreach (string s in strings)
		{
			api.PrintText(s);
		}
		api.DynelControl.Spawn(8277116, 299, 0, 172, 545);
		api.ExecuteScript("Scripts\\spawn.cs");
        
	}

	void scriptTick_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
	{
		api.DynelControl.Spawn(31336, 100, 100, 100, 100);
	}
}